# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gtk-doc
pkgver=1.32
pkgrel=0
pkgdesc="Documentation tool for public library API"
url="https://www.gtk.org/gtk-doc/"
arch="noarch"
license="GPL-2.0-or-later AND GFDL-1.1-or-later"
depends="docbook-xsl python3 py3-six pkgconf glib-dev py3-pygments"
makedepends="rarian-dev gettext autoconf automake libtool"
checkdepends="bc"
source="https://download.gnome.org/sources/gtk-doc/$pkgver/gtk-doc-$pkgver.tar.xz"

# it does not seem to be possible to disable tests of pdf which requires dblatex or fop
# disable checks for now
options="!check"

prepare() {
	cd "$builddir"
	autoreconf -vif
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-highlight=highlight
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="6d28395968c2951f1685570e5778b5add76d1b9cff8fcb8632b200b3ba251602a1ea59b1def84fc28560988b87fc0dbbc6947af88d268db6ff23e9c28aea3b28  gtk-doc-1.32.tar.xz"
